module.exports = {
    productionSourceMap: true,
    // publicPath: './',
    publicPath: '/loginCT',
    devServer: {
        port: 5500,
        proxy: {
            '/api': {
                target: 'http://59.36.87.106:9080',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    '^/api': '/'
                }
            }
        },
    },
    configureWebpack: config => {
        if (process.env.NODE_ENV === 'production') {
            // 清空console
            config.optimization.minimizer[0].options.terserOptions.compress.warnings = false;
            config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true;
            config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true;
            config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log'];
        }
    }
}